<template>
  <div class="rights">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-table ref="singleTable" :data="tableData" highlight-current-row style="width: 100%">
      <el-table-column type="index" label="#">
      </el-table-column>
      <el-table-column property="authName" label="权限名">
      </el-table-column>
      <el-table-column  property="path" label="路径">
      </el-table-column>
      <el-table-column property="level" label="层级">
        <template v-slot:default="{ row: { level }}">
          <span>{{level | rename}}</span>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data () {
    return {
      tableData: []
    }
  },
  async created () {
    let res = await this.$axios.get(`rights/list`)
    console.log(res)
    this.tableData = res.data
  }
}
</script>

<style>

</style>
